package com.example.gokchinesefoodmappcdev.service;

import com.example.gokchinesefoodmappcdev.entity.PageBean;
import com.example.gokchinesefoodmappcdev.entity.dto.GoodsDTO;
import com.example.gokchinesefoodmappcdev.entity.dto.GoodsInfoAndGoodsSkuDTO;
import com.example.gokchinesefoodmappcdev.entity.dto.GoodsInfoExcelDTO;
import com.example.gokchinesefoodmappcdev.entity.dto.UpdateGoodsDTO;
import com.example.gokchinesefoodmappcdev.util.ResultData;

import java.util.List;

public interface GoodsInfoService {
    ResultData insertGoodsInfo(GoodsDTO goodsInfo);

    Integer selectGoodsIdByGoodCode(GoodsDTO goodsInfo);

    ResultData selectGoodsList(int pageSize, int pageNumber);

    ResultData selectGoodsInfoById(int id);

    ResultData removeGoodById(Integer goodId);

    ResultData updateGoodsOnSale(int id, String onSale);

    ResultData updateGoodsInfo(UpdateGoodsDTO goodsDTO);

    List<GoodsInfoExcelDTO> getGoodsInfo();

    /**
     * 分页查询
     * 根据条件查询所有商品
     * @param goodsInfoAndGoodsSkuDTO
     * @param pageNum
     * @param pageSize
     * @return
     */
    public PageBean<GoodsInfoAndGoodsSkuDTO> selectGoodsAll(GoodsInfoAndGoodsSkuDTO goodsInfoAndGoodsSkuDTO, int pageNum, int pageSize);

    /**
     * 根据id查询商品详情
     * @param goodsInfoAndGoodsSkuDTO
     * @return
     */
    public ResultData selectGoodsAndAttrKeyAndAttrValAndPicAndSku(GoodsInfoAndGoodsSkuDTO goodsInfoAndGoodsSkuDTO);

    /**
     * 商品审核
     * @param id 商品
     * @param reviewRet 审核状态
     * @return
     */
    public ResultData updateGoodsInfoReviewStatusById(int id, String reviewRet);
}
